<script>
	import {mapMutations} from 'vuex'
	export default {
		onLaunch: function() {
			// console.log('App Launch')
			// 2方式二 持久化存储
			uni.getStorage({
				key: 'userInfo',
				success: (res) => {
					console.log(res)
					// 再次存储到vuex
					// this.$store.commit('storeLogin', JSON.parse(res.data))
					this.storeLogin(JSON.parse(res.data).profile)
				}
			})
		},
		onShow: function() {
			// console.log('App Show')
		},
		onHide: function() {
			// console.log('App Hide')
		},
		methods: {
			...mapMutations(['storeLogin'])
		}
	}
</script>

<style>
	/*每个页面公共css */
	@import './common/css/iconfont.css';
	@import './common/css/common.scss';
</style>
